/*
 * Phrase.cpp
 *
 *  Created on: Nov 18, 2012
 *      Author: m
 */

#include "Phrase.h"

namespace physical
{

Phrase::Phrase() :
        m_text(), m_authorSurname(), m_authorName()
{
}

Phrase::Phrase( const Phrase& other )
{
    *this = other;
}

Phrase::Phrase( const std::string& text, const std::string& authorSurname,
        const std::string& authorName ) :
        m_text( text ), m_authorSurname( authorSurname ), m_authorName(
                authorName )
{
}

Phrase::~Phrase()
{
}

const std::string& Phrase::getText() const
{
    return m_text;
}

const std::string& Phrase::getAuthorSurname() const
{
    return m_authorSurname;
}

const std::string& Phrase::getAuthorName() const
{
    return m_authorName;
}

void Phrase::setText( const std::string& text )
{
    m_text = text;
}

void Phrase::setAuthorSurname( const std::string& authorSurname )
{
    m_authorSurname = authorSurname;
}

void Phrase::setAuthorName( const std::string& authorName )
{
    m_authorName = authorName;
}

Phrase& Phrase::operator =( const Phrase& rhs )
{
    this->m_text = rhs.m_text;
    this->m_authorSurname = rhs.m_authorSurname;
    this->m_authorName = rhs.m_authorName;
    return *this;
}

bool Phrase::operator ==( const Phrase& other ) const
{
    return this->m_text == other.m_text
            && this->m_authorSurname == other.m_authorSurname
            && this->m_authorName == other.m_authorName;
}

bool Phrase::operator !=( const Phrase& other ) const
{
    return !( *this == other );
}

} /* namespace physical */
